<?php
error_reporting(E_ALL^E_NOTICE);
set_time_limit(0);

require_once 'DbDriver/M.php';
$ob = M("z_fun_subject");


$myfile = fopen("Total-71.txt", "r") or die("Unable to open file!");
$r = date('YmdHis').rand(1000,9999);
while(!feof($myfile)) {
    $line = fgets($myfile);
    if(empty(trim($line))){
        continue;
    }
    $tmp = array(
        "data" =>  trim($line),
        'no'    => $r,
        'category'    => 'book001',
    );
    $ob->add($tmp);
}
fclose($myfile);
